<template>
  <div class="about">
    <h1>授课教师{{ teacher.name }}你好！</h1>
  </div>
  <a :href="'/teacher/' + teacher.id + '/courses_and_clazzes'">所授班级课程</a>
  <a :href="'/teacher/' + teacher.id + '/attend_list'">所有考勤列表</a>

  <router-view />

</template>

<script>
import { computed } from 'vue'
import { mapActions, mapState } from 'pinia'
import { useTeacherStore } from '../../stores/teacher'

export default {
  inject: ['axios'],
  methods: { ...mapActions(useTeacherStore, ['fetchTeacher']) },


  async created() {
    await this.fetchTeacher(this.$route.params.id);
  },
  computed: {
    ...mapState(useTeacherStore, ['teacher'])
  },
  data() {
    return {
      list: []//所授全部课程和班级的组合[{courseId:1,courseName:'算法',clazzId:1,clazzName:'软件2202'}]
    }
  }

}

</script>


<style>
@media (min-width: 1024px) {
  .about {
    min-height: 100vh;
    display: flex;
    align-items: center;
  }
}

tbody,
tr,
td {
  border-width: 1px;
}
</style>
